package com.hondee.fuzzyquery.entity.access;

import com.hondee.fuzzyquery.utils.StringUtil;

public abstract class AbstractEntityAccess implements IEntityAccess {
	
	protected String accessId;
	
	protected IQuery query;
	
	public AbstractEntityAccess(String accessId,IQuery query){
		if(query==null){
			throw new RuntimeException("Query should not be null in entity access.");
		}
		if(StringUtil.isNullOrEmpty(accessId)){
			throw new RuntimeException("accessId should not be null in entity access.");
		}
		this.query = query;
		this.accessId = accessId;
	}
	
	public IQuery getQuery(){
		return query;
	}
}
